#include "org/organiser.h"

#ifndef QMATCHEDPATHMODEL_H
#define QMATCHEDPATHMODEL_H

#include <QAbstractTableModel>

class QMatchedPathModel : public QAbstractTableModel
{
    Q_OBJECT
public:

    vector<MatchedPath> *matched_paths;
    QMatchedPathModel(vector<MatchedPath>*, QObject *parent = 0);

    virtual int rowCount(const QModelIndex &parent = QModelIndex()) const;
    virtual int columnCount(const QModelIndex &parent = QModelIndex()) const;
    QVariant data(const QModelIndex &index, int role) const;

    QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
    bool setData(const QModelIndex &index, const QVariant &value, int role= Qt::EditRole);

    Qt::ItemFlags flags(const QModelIndex &index) const;

    // inserting and removing rows
    bool insertRows(int position, int rows, const QModelIndex &index = QModelIndex());
    bool removeRows(int position, int rows, const QModelIndex &index = QModelIndex());

};

#endif // QMATCHEDPATHMODEL_H
